
class Inspector < Document

  def initialize(target)
    super(nil, 'Inspector')
    @oi = ObjectInspector.new()
    @oi.inspect(target.class.name, target)
    add_css("/css/samples.css")
  end

  def render_on(html)
    super(html) { |html| 
      html.div(:class=>'window-titlebar') {
        html.span(:class=>'window-title') { html.lit('Inspector') }
        html.span(:class=>'window-close') { 
          html.link('close') {
            answer
          }
        }      
      }
      html.heading('Inspector')
      html.hr
      html.render(@oi)
    }
  end

end
